package org.example.jccluboss.service;

import lombok.SneakyThrows;
import org.example.jccluboss.adapter.StorageAdapter;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 啊昌
 * @date 2025/4/17 22:23
 * FileService 文件存储service
 */
@Service
public class FileService {

//	@Resource
//	private StorageAdapter storageAdapter;

//	通过构造器注入
	private final StorageAdapter storageAdapter;

	public FileService(StorageAdapter storageAdapter) {
		this.storageAdapter = storageAdapter;
	}
	@SneakyThrows
	/**
	 * 列出所有桶
	 */
	public List<String> getAllBucket() {
		return storageAdapter.getAllBucket();
	}
}
